<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="Expires" content="0">
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-control" content="no-cache">
		<meta http-equiv="Cache" content="no-cache">
		<title>推荐码管理|信息后台管理系统</title>
		<link rel="shortcut icon" href="${request.contextPath}/bootstrap/img/loading.gif">
		<link rel="stylesheet" type="text/css" href="${request.contextPath}/res/jquery-easyui-1.3.6/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="${request.contextPath}/res/jquery-easyui-1.3.6/themes/icon.css">
		<script type="text/javascript" src="${request.contextPath}/res/jquery-easyui-1.3.6/jquery-1.11.1.js"></script>
		<script type="text/javascript" src="${request.contextPath}/res/jquery-easyui-1.3.6/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${request.contextPath}/res/jquery-easyui-1.3.6/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${request.contextPath}/res/jquery-easyui-1.3.6/jquery.qrcode.min.js"></script>
		<script type="text/javascript" src="${request.contextPath}/res/jquery-easyui-1.3.6/code.js"></script>
		<style>
			._label{  
			    display: inline-block;  
			    vertical-align: middle;  
			    height: 20px;
			    line-height: 20px;
			}
			
			.show{
		font-size: 16px;
		width: 1450px;
		margin: 20px auto;
	}
	.show table{
		border-collapse: collapse;
		border: none;
		width: 1450px;
	}
	.show table td{
		padding: 5px;
		border: 1px solid #CCCCCC;
	}
	.show table td input[type=text]{
		width: 200px;
	}
	
	.show table td img{
		 margin: 5px
	}
	
	.show table td input[type=button]{
		font-size: 20px;
		cursor: pointer;
		background: #F05E0F;
		border: none;
		width: 150px;
		height: 30px;
	}
	
	
	#dd table tr:first-child{
		text-align: right;
	}
		</style>
		<script>
		</script>
	</head>

	<body id="body" class="easyui-layout" style="width: 100%; height: 100%;" scroll="no">
		<!-- 头部 -->
		<div data-options="region:'north',border:false, collapsible:false" title="推荐码管理" style="border: 0px red solid; overflow: hidden;">
			<div id="tbn" style="padding:5px 15px; height:auto, vertical-align: middle; font-size:16px;height: 60px;">
				<span class="_label">操作:</span>
				<a href="#" class="easyui-linkbutton" iconCls="icon-add" onclick="javascript:openAddWindow();">添加</a>
				<!--  <a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick="javascript:openUpdateWindow();">修改</a>-->
				<a href="#" class="easyui-linkbutton" iconCls="icon-cut" onclick="javascript:openDeleteWindow();">删除</a>
				<input type="text" name="q_code" id="q_code" />
				<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="javascript:queryCode();">查询</a>
			</div>
		</div>
		<!-- 头部  end -->

		<div data-options="region:'center'">
			<table id="datagrid" class="easyui-datagrid" style="width:auto" data-options="url:'code/load', method:'post' ,rownumbers:true, fit:true, pagination:true, singleSelect:true, showFooter:true, striped:true,toolbar:'#tb'">
				<thead>
					<tr>
						<th data-options="field:'id', width:'40', align:'center', hidden:true">id</th>
						<th data-options="field:'name', width:'100', align:'center'">姓名</th>
						<th data-options="field:'member', width:'100', align:'center'">所属会员</th>
						<th data-options="field:'code', width:'100', align:'center'">推荐码</th>
						<th data-options="field:'url', width:'500', align:'center', formatter:formatterUrl">注册地址</th>
						<th data-options="field:'date', width:'130', align:'center'">时间</th>
					</tr>
				</thead>
			</table>
		</div>

		<div id="dd" class="easyui-dialog" title="会员信息维护" style="width:300px;height:150px; padding: 5px;" data-options="iconCls:'icon-save',closed:true,closable:false,
	        resizable:true,modal:true,
	        buttons:[{
				text:'确定',
				handler:submit
			},{
				text:'关闭',
				handler:closeWindow
			}]">
			<input type="hidden" value="-1" id="id" />
			<table border="0" cellspacing="0" cellpadding="0" style="margin:auto">
				<tr>
					<td style="text-align: right;">会员编号:</td>
					<td>
						<#if sysAdmin.nickname="admin">
							<select id="member" name="member" style="width: 150px;">
								<#list memberMap?keys as key> 
				                    <option value="${key}">${key}</option>
				                </#list>
							</select>
						<#else>
							<input type="text" name="member" id="member" value="${sysAdmin.nickname}" readonly="readonly" />
						</#if>
					</td>
				</tr>
				<tr>
					<td style="text-align: right;">推荐码:</td>
					<td>
						<input type="text" name="code" id="code" value="" />
					</td>
				</tr>
				<tr>
					<td style="text-align: right;">推荐人:</td>
					<td>
						<input type="text" name="name" id="name" value="" />
					</td>
				</tr>
			</table>
		</div>
		
		<!-- 二维对话框 -->
		<div id="qrcode_dialog" class="easyui-dialog" title="注册地址二维码" style="width:400px;height:320px; padding: 10px; padding-top: 30px;" data-options="iconCls:'icon-save',closed:true,closable:false,
	        resizable:true,modal:true,
	        buttons:[{
				text:'关闭',
				handler:closeQrcodeDialog
			}]">
			<div id="qrcode_div" style="width: 200px; height: 200px; margin: 0 auto;">
			
			</div>
		</div>
	</body>

</html>